<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./OL_SDK/include-openlayers-local.js"></script>
    <script src="./libs/gaode.js"></script>
</head>

<body>
    <div id="map">
    </div>
    <script>
        var map = new ol.Map({
            target: "map",
            layers: [gaode],
            view: new ol.View({
                projection: 'EPSG:4326',
                center: [114.30, 30.50],
                zoom: 4
            })
        })
        /* 圆 */
        var Circle = new ol.Feature({
            /*
            第一个参数:圆的中心点
            第二个参数:圆的半径 
             */
            geometry: new ol.geom.Circle([114.30, 30.50], 5)
        });
        /* style */
        Circle.setStyle(new ol.style.Style({
            //填充色
            fill: new ol.style.Fill({
                color: 'rgba(255, 255, 255, 0.7)'
            }),
            //边线颜色
            stroke: new ol.style.Stroke({
                color: '#ffcc33',
                width: 6
            })
        }));
        /* 2、source-layer-map */
        //实例化一个矢量图层Vector作为绘制层
        var source = new ol.source.Vector({
            features: [Circle],
            /* 横坐标方向不重复 */
            wrapX: false
        });
        //创建一个图层
        var vector = new ol.layer.Vector({
            source: source,
            zIndex: 2
        });
        //将绘制层添加到地图容器中
        map.addLayer(vector);



        var Circle2 = new ol.Feature({
            /*
            第一个参数:圆的中心点
            第二个参数:圆的半径 
             */
            geometry: new ol.geom.Circle([114.30, 30.50], 3)
        });
        /* style */
        Circle2.setStyle(new ol.style.Style({
            //填充色
            fill: new ol.style.Fill({
                color: 'red'
            }),
            //边线颜色
            stroke: new ol.style.Stroke({
                color: '#ffcc33',
                width: 6
            })
        }));
        /* 2、source-layer-map */
        //实例化一个矢量图层Vector作为绘制层
        var source2 = new ol.source.Vector({
            features: [Circle2],
            /* 横坐标方向不重复 */
            wrapX: false
        });
        //创建一个图层
        var vector2 = new ol.layer.Vector({
            source: source2,
            zIndex: 6
        });
        /* zIndex可以设置图层的堆叠顺序 */
        //将绘制层添加到地图容器中
        map.addLayer(vector2);
    </script>
</body>

</html>